﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link href="../Frozenui1.3/css/frozen.css" rel="stylesheet" />
    <script src="../JS/zepto.min.js"></script>
    <script src="../Frozenui1.3/js/frozen.js"></script>
    <script src="../JS/MobileCom.js"></script>
    <script src="../JS/avalon.mobile.min.js"></script>
    <script src="../JS/iscroll.js"></script>
    <title>流程类型列表</title>
    <style type="text/css">
        .ui-border {
            padding: 10px;
        }

        .ui-list > li {
            margin: 3px;
        }

        .ui-border {
            background-color: #fff;
        }

            .ui-border .v {
                border-top: solid 1px #ede8e8;
                padding: 5px;
                margin-top: 10px;
                font-size: 12px;
            }

                .ui-border .v span {
                    font-size: 10px;
                    float: right;
                }

        .ui-label-s {
            margin-right: 5px;
        }


        .ms-controller, [ms-controller] {
            display: none;
        }

        #pullDown, #pullUp {
            background: #fff;
            height: 40px;
            line-height: 40px;
            padding: 5px 10px;
            border-bottom: 1px solid #ccc;
            font-weight: bold;
            font-size: 14px;
            color: #888;
        }

            #pullDown .pullDownIcon, #pullUp .pullUpIcon {
                display: block;
                float: left;
                width: 40px;
                height: 40px;
                background: url(../Images/pull-icon@2x.png) 0 0 no-repeat;
                -webkit-background-size: 40px 80px;
                background-size: 40px 80px;
                -webkit-transition-property: -webkit-transform;
                -webkit-transition-duration: 250ms;
            }

            #pullDown .pullDownIcon {
                -webkit-transform: rotate(0deg) translateZ(0);
            }

            #pullUp .pullUpIcon {
                -webkit-transform: rotate(-180deg) translateZ(0);
            }

            #pullDown.flip .pullDownIcon {
                -webkit-transform: rotate(-180deg) translateZ(0);
            }

            #pullUp.flip .pullUpIcon {
                -webkit-transform: rotate(0deg) translateZ(0);
            }

            #pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
                background-position: 0 100%;
                -webkit-transform: rotate(0deg) translateZ(0);
                -webkit-transition-duration: 0ms;
                -webkit-animation-name: loading;
                -webkit-animation-duration: 2s;
                -webkit-animation-iteration-count: infinite;
                -webkit-animation-timing-function: linear;
            }

        @-webkit-keyframes loading {
            from {
                -webkit-transform: rotate(0deg) translateZ(0);
            }

            to {
                -webkit-transform: rotate(360deg) translateZ(0);
            }
        }
    </style>
</head>
<body ms-controller="list">
    <header class="ui-header ui-header-stable ui-border-b">
        <i class="ui-icon-return" onclick="back()"></i>
        <h1>流程类型列表</h1>
    </header>
    <section class="ui-container">
        <div id="wrapper">
            <ul class="ui-list ui-list-pure" style="background-color:#f6f0f0;">

                <li class="ui-border ui-label-list ui-arrowlink" ms-repeat-el="ctData" ms-click="vieww(el)">
                    <a class="ui-list-info" href="#">
                        <p><h2><span class="ui-txt-default">{{el.ProcessName}}</span></h2></p>
                    </a>
                </li>

            </ul>
        </div>
    </section>
    <script>
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            //隐藏右上角按钮
            WeixinJSBridge.call('hideOptionMenu');
        });

        window.localStorage.removeItem("page");
        window.localStorage.setItem("page", 1);

        window.localStorage.removeItem("isjz");
        window.localStorage.setItem("isjz", 0);

        var model = avalon.define({
            $id: "list",
            ctData: [],
            vieww: function (el) {
                window.location = "UI_LCSP_INPUT.html?Type=" + el.ID + "&r=" + Math.random();
            }
        });
        avalon.ready(function () {
            var conloading = $.loading({
                content: '正在努力加载中...'
            })
            $.post("/API/WXAPI.ashx?Action=GETWFPDLIST&r=" + Math.random(), { "P1": "1" }, function (data) {
                conloading.loading("hide");
                var data = $.parseJSON(data);
                if (data.ErrorMsg == "") {
                    model.ctData = data.Result;
                }
                else {
                    $.tips({
                        content: "流程类型加载失败，原因：" + data.ErrorMsg,
                        stayTime: 2000,
                        type: "warn"
                    })
                }

            });
        })
        function back() {
            window.location.replace("UI_BASE_PAGE.html?r=" + Math.random());
        }
    </script>
</body>

</html>
